VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Filter a string from these characters: _ - ( ) < > / , or you can add other characters that you do

by Choti (2 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 17th February 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Filter a string from these characters: _ - ( ) < > / , or you can add other characters that you do not want to be part of the string.

Rate Filter a string from these characters: _ - ( ) < > / , or you can add other characters that you do



Public Function strfltr(passstr As String) As String
Dim vlen As Variant
Dim txtmid As String
Dim i As Integer
    vlen = Len(passstr)
    For i = 1 To vlen
        txtmid = Mid(passstr, i, 1)
        If txtmid <> "_" And txtmid <> "-" And txtmid <> "(" And txtmid <> ")" And txtmid <> "/" And txtmid <> "," Then
            strfltr = strfltr + txtmid
        End If
    Next
End Function


Download this snippet    Add to My Saved Code

Filter a string from these characters: _ - ( ) < > / , or you can add other characters that you do Comments

No comments have been posted about Filter a string from these characters: _ - ( ) < > / , or you can add other characters that you do . Why not be the first to post a comment about Filter a string from these characters: _ - ( ) < > / , or you can add other characters that you do .

Post your comment

Subject:
Message:
0/1000 characters